import { Product as ProductType } from '@/types/product'

export interface Product {
  id: string
  name: string
  category: string
  description: string
  features: string[]
  images: { url: string; alt: string }[]
  specifications: { [key: string]: string }
}

export const productCategories = [
  {
    id: 'pallet',
    name: '托盘系列',
    subcategories: ['胶合卡板', '木卡板', '纸卡板', '欧标托盘', '美式托盘', '实木栈板']
  },
  {
    id: 'box',
    name: '包装箱系列',
    subcategories: ['钢带箱', '围箱木箱', '危险品木箱', '航空箱', '出口免检箱', '重型设备箱']
  },
  // {
  //   id: 'corner',
  //   name: '护角系列',
  //   subcategories: ['纸护角', '塑料护角', '纸卡板护角', '木质护角']
  // },
  {
    id: 'wooden-box',
    name: '木箱系列',
    subcategories: ['卡扣木箱', '免检木箱', '出口木箱', '普通木箱', '围板木箱']
  }
]

export const products: ProductType[] = [
  {
    id: 'plywood-pallet',
    name: '胶合卡板',
    category: 'pallet',
    description: '采用优质胶合板制作，具有承重能力强、防潮防霉、可回收利用等特点。适用于各类货物存储和运输。',
    features: [
      '高强度承重',
      '防潮防霉',
      '可回收环保',
      '尺寸规格可定制',
      '符合出口标准'
    ],
    images: [
      {
        url: 'http://www.fqbzh.com/uploadfile/ueditor/image/202304/1681460417605d93.jpg',
        alt: '胶合卡板实物图'
      },
      {
        url: 'http://www.fqbzh.com/uploadfile/ueditor/image/202304/1681460367107d29.jpg',
        alt: '胶合卡板应用场景'
      },
      {
        url: 'http://www.fqbzh.com/uploadfile/ueditor/image/202304/16814603132e1618.jpg',
        alt: '胶合卡板应用场景'
      }
    ],
    specifications: {
      '材质': '优质胶合板',
      '标准尺寸': '1200×1000×150mm',
      '承重': '1-2吨'
    }
  },
  {
    id: 'pallet',
    name: '实木托盘',
    category: 'pallet',
    description: '采用优质实木制作，具有承重能力强、防潮防霉、可回收利用等特点。适用于各类货物存储和运输。',
    features: [
      '高强度承重',
      '防潮防霉',
      '可回收环保',
      '尺寸规格可定制',
      '符合出口标准'
    ],
    images: [
      {
        url: '/images/products/sm1.jpg',
        alt: '实木托盘实物图'
      },
      {
        url: '/images/products/sm2.jpg',
        alt: '实木托盘应用场景'
      },
      {
        url: '/images/products/sm3.jpg',
        alt: '实木托盘应用场景'
      }
    ],
    specifications: {
      '材质': '优质实木托盘',
      '标准尺寸': '1200×1000×150mm',
      '承重': '1-2吨',
    }
  },
  {
    id: 'steel-belt-box',
    name: '钢带箱',
    category: 'box',
    description: '采用优质实木和钢带加固，具有超强承重能力和防护性能，适用于重型设备和精密仪器的运输包装。',
    features: [
      '钢带加固更牢固',
      '防撞击防变形',
      '可重复使用',
      '适合重型货物',
      '符合国际运输标准'
    ],
    images: [
      {
        url: '/images/products/g1.jpg',
        alt: '钢带箱应用场景'
      },
      {
        url: '/images/products/g2.jpg',
        alt: '钢带箱实物图'
      },
      {
        url: '/images/products/g3.jpg',
        alt: '钢带箱应用场景'
      },
      {
        url: '/images/products/g4.jpg',
        alt: '钢带箱应用场景'
      },
      {
        url: '/images/products/g5.jpg',
        alt: '钢带箱应用场景'
      }
       
    ],
    specifications: {
      '材质': '实木 + 钢带',
      '钢带规格': '16-19mm',
      '防护等级': 'IP54'
    }
  },
  {
    id: 'euro-pallet',
    name: '欧标托盘',
    category: 'pallet',
    description: '符合欧洲标准的托盘，采用优质木材制作，适用于国际物流运输。',
    features: [
      '符合EPAL标准',
      '四面进叉',
      '高强度耐用',
      '标准化尺寸',
      '适合自动化仓储'
    ],
    images: [
      {
        url: '/images/products/om1.jpg',
        alt: '欧标托盘实物图'
      },
      {
        url: '/images/products/p5.jpg',
        alt: '欧标托盘应用场景'
      },
      {
        url: '/images/products/p6.jpg',
        alt: '欧标托盘应用场景'
      }

    ],
    specifications: {
      '尺寸': '1200×800×144mm',
      '承重': '1500kg',
      '重量': '25kg'
    }
  },
  {
    id: 'non-soaking-wooden-box',
    name: '免蒸木箱',
    category: 'box',
    description: '产品采用免熏蒸技术，具有超强防护性能，可承载重型设备和精密仪器',
    features: [
      '免蒸技术',
      '抗压耐磨',
      '轻便易用',
      '成本经济',
      '多种规格可选'
    ],
    images: [
      {
        url: '/images/products/z1.jpg',
        alt: '免蒸木箱实物图'
      },
      {
        url: '/images/products/z2.jpg',
        alt: '免蒸木箱应用实例'
      },
      {
        url: '/images/products/z3.jpg',
        alt: '免蒸木箱应用实例'
      },
      {
        url: '/images/products/z4.jpg',
        alt: '免蒸木箱应用实例'
      },
      {
        url: '/images/products/z5.jpg',
        alt: '免蒸木箱应用实例'
      }
    ],
    specifications: {
      '材质': '实木/胶合板',
      '厚度': '3-5mm',
      '长度': '1-3m可选'
    }
  },
  {
    id: 'high-quality-wooden-box',
    name: '特质木板箱',
    category: 'box',
    description: '采用高品质木材制作，具有超强防护性能，可承载重型设备和精密仪器',
    features: [
      '高品质木材',
      '防震防腐蚀',
      '耐腐蚀耐磨',
      '轻便易用',
      '成本经济'
    ],
    images: [
      {
        url: '/images/products/t1.jpg',
        alt: '特质木板箱实物图'
      },
      {
        url: '/images/products/t2.jpg',
        alt: '特质木板箱应用实例'
      },
      {
        url: '/images/products/t3.jpg',
        alt: '特质木板箱应用实例'
      },
      {
        url: '/images/products/t4.jpg',
        alt: '特质木板箱应用实例'
      },
    ],
    specifications: {
      '材质': '实木/胶合板',
      '厚度': '3-5mm',
      '长度': '1-3m可选'
    }
  },
  {
    id: 'dangerous-goods-box',
    name: '危险品木箱',
    category: 'box',
    description: '专门用于危险品运输的木箱，符合国际危险品运输标准，具有特殊的防护和标识要求。',
    features: [
      '符合UN危包标准',
      'IPPC熏蒸认证',
      '防震防潮',
      '带警示标识',
      '可定制尺寸'
    ],
    images: [
      {
        url: '/images/products/p1.png',
        alt: '危险品木箱实物图'
      },
      {
        url: '/images/products/p2.png',
        alt: '危险品木箱标识细节'
      }
    ],
    specifications: {
      '材质': '实木/胶合板',
      '防护等级': 'UN4C/X',
      '熏蒸标准': 'IPPC-ISPM 15'
    }
  },
  {
    id: 'custom-pallet',
    name: '木卡板',
    category: 'pallet',
    description: '根据客户特殊需求定制的非标准托盘，可适应不同形状和尺寸的货物。',
    features: [
      '完全定制化',
      '适应特殊货物',
      '材质可选',
      '结构优化',
      '承重设计'
    ],
    images: [
      {
        url: 'http://www.fqbzh.com/uploadfile/ueditor/image/202304/1681458421a16379.jpg',
        alt: '木卡板'
      },
      {
        url: 'http://www.fqbzh.com/uploadfile/ueditor/image/202304/1681458407dc58ae.jpg',
        alt: '木卡板'
      },
      {
        url: 'http://www.fqbzh.com/uploadfile/ueditor/image/202304/1681458376493f3c.jpg',
        alt: '木卡板'
      },
    ],
    specifications: {
      '材质': '实木/胶合板可选',
      '尺寸': '根据需求定制',
      '承重': '按需设计'
    }
  },
  {
    id: 'wooden-box',
    name: '木箱',
    category: 'wooden-box',
    description: '采用优质木材制作，具有承重能力强、防潮防霉、可回收利用等特点。适用于各类货物存储和运输。',
    features: ['高强度承重', '防潮防霉', '可回收环保', '尺寸规格可定制', '符合出口标准'],
    images: [
      {
        url: '/images/products/p10.jpg',
        alt: '木箱实物图'
      },
      {
        url: '/images/products/p11.jpg',
        alt: '木箱应用场景'
      },
      {
        url: '/images/products/p12.jpg',
        alt: '木箱应用场景'
      }
    ],
    specifications: {
      '材质': '实木/胶合板',
      '尺寸': '根据需求定制',
      '承重': '按需设计'
    }
  }
]

export function getProductById(id: string): ProductType | undefined {
  return products.find(product => product.id === id)
}

export function getRelatedProducts(ids: string[]): ProductType[] {
  return products.filter(product => ids.includes(product.id))
}
